package jdk.net;

import java.net.InetSocketAddress;
import java.net.Socket;

public class SocketTest {
	public static void main(String[] args) throws Exception {
		Socket socket = new Socket();
		socket.connect(new InetSocketAddress("www.baidu.com", 80));
		System.out.println(socket.getRemoteSocketAddress());
		System.out.println(socket.getInetAddress());
	}
}
